<script setup>

  import useUserStore from '@/stores/user'
  const userStore = useUserStore()
  import { getTimePeriod } from '@/utils/time.js'
  import settings from '@/settings'

</script>
<template>
  <el-card>
    <div class="home-card">
      <img
        :src='userStore.avatar'
        alt=""
      >
      <div class="home-card-content">
        <h2>{{ getTimePeriod() }}好！{{ userStore.username }}</h2>
        <p>欢迎使用{{ settings.title }}</p>
      </div>
    </div>
  </el-card>
</template>
<style scoped>
  .home-card {
    display: flex;
    align-items: center;
  }

  .home-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
  }

  .home-card-content {
    margin-left: 40px;
    font-size: 16px;
    text-align: center;
  }

  .home-card-content h2 {
    margin-bottom: 20px;
  }

  .home-card-content p {
    font-style: italic;
    color: #666;
  }
</style>